1. Field of the Invention
The present invention relates to a vector graphics shape data generation apparatus, rendering apparatus, method, and program for rendering an image.
2. Description of the Related Art
Along with popularization of high-definition (HD) video devices including an HDTV, HD DVD, and next-generation home game device, a technique of efficiently rendering high-quality vector graphics and outline fonts in a high-definition computer graphics (CG) image is expected to be necessary in the future.
To efficiently render vector graphics by using a graphics processing unit (GPU) serving as a graphics LSI, a technique is used which causes a GPU to render a closed curve including two kinds of contours, i.e., line segments and quadratic Bezier curves, based on the fact that a pixel shader recently installed in a GPU can determine whether each pixel falls inside or outside a quadratic Bezier curve (e.g., C. Loop and J. Blinn, “Resolution Independent Curve Rendering using Programmable Graphics Hardware”, In Proc. of ACM SIGGRAPH2005, pp. 1000-1009).
More specifically, a closed curve is segmented into parts each formed from a single quadratic Bezier curve and contour parts each including no curves but only straight lines. The single quadratic Bezier curve contour parts are rendered by a pixel shader while the linear contour parts are rendered by triangulation. It is possible to render a smooth curve independently of the display resolution by causing the pixel shader to determine whether each pixel falls inside or outside a quadratic Bezier curve.
This method requires to segment the interior of a linear contour part by triangulation in advance on the CPU. However, when the stencil buffer function of the GPU is used, render contour information can be rendered directly on the GPU. This enables us to render an outline font on the basis of the contour information stored on a video memory.
To display a Japanese outline font, it is necessary to hold the contour shapes of kanji characters which have a large number of strokes. The contour shape of one kanji character includes hundreds to thousands vertex coordinates. A Japanese font has thousands to tens of thousands of character types. There are also font designs such as Maru-Gothic, Kaku-Gothic, and Mincho. A technique is therefore required to efficiently store the shape information of character fonts in a limited memory area such as a graphics memory.